
import { Fragment } from "react/jsx-runtime"
import { useEffect, useState, useContext } from "react"
import styles from './index.module.scss'
import { useRequest } from "ahooks"
import { Button } from 'react-vant';
import { useNavigate } from "react-router-dom"
import { setSearchParams, getSearchParams, clearSearchParams, clearSomeSearchParams, FILTER_PARAMS_ENUM } from "@/utils/pageSearchParamsCache";
import { useIsMobile } from '@/hooks/useIsMobile'
import { DocumentTitleContext } from "@/hooks/useDocumentTitle";

const Home = () => {
    const { setTitle } = useContext(DocumentTitleContext)
    const isMobile = useIsMobile()

    const navigate = useNavigate();



    useEffect(() => {
        clearSomeSearchParams([
            FILTER_PARAMS_ENUM.CHAIN_B2C_FILTER_PARAMS_NAME,
            FILTER_PARAMS_ENUM.CHAIN_O2O_FILTER_PARAMS_NAME,
        ])
    }, [])

    return (
        <Fragment>
            <div className={styles["chain-store-block"]}>
                 首页

                 <Button type='primary' onClick={ ()=> { navigate('/cockpit') }}>点击</Button>

            </div>
        </Fragment>
    )
}

export default Home